<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>
        <p:dialog id="SolicitacaoHistoricoEditDlg" widgetVar="SolicitacaoHistoricoEditDialog" modal="true" resizable="false"  appendTo="@(body)" header="#{bundle.EditSolicitacaoHistoricoTitle}" closeOnEscape="true">

            <h:form id="SolicitacaoHistoricoEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{solicitacaoHistoricoController.selected != null}">

                        <h:outputLabel value="#{bundle.EditSolicitacaoHistoricoLabel_id}" for="id" />
                        <h:panelGroup>
                            <h:outputText id="id" value="#{solicitacaoHistoricoController.selected.id}" />
                            <p:tooltip for="id" value="#{solicitacaoHistoricoController.getComponentMessages('id', bundle.EditSolicitacaoHistoricoHelpText_id)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.EditSolicitacaoHistoricoLabel_dataHora}" for="dataHora" />
                        <h:panelGroup>
                            <p:calendar id="dataHora" pattern="MM/dd/yyyy HH:mm:ss" value="#{solicitacaoHistoricoController.selected.dataHora}" title="#{bundle.EditSolicitacaoHistoricoTitle_dataHora}" required="true" requiredMessage="#{bundle.EditSolicitacaoHistoricoRequiredMessage_dataHora}" showOn="button"/>
                            <p:tooltip for="dataHora" value="#{solicitacaoHistoricoController.getComponentMessages('dataHora', bundle.EditSolicitacaoHistoricoHelpText_dataHora)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.EditSolicitacaoHistoricoLabel_observacao}" for="observacao" />
                        <h:panelGroup>
                            <p:inputText id="observacao" value="#{solicitacaoHistoricoController.selected.observacao}" title="#{bundle.EditSolicitacaoHistoricoTitle_observacao}" size="255" maxlength="255"/>
                            <p:tooltip for="observacao" value="#{solicitacaoHistoricoController.getComponentMessages('observacao', bundle.EditSolicitacaoHistoricoHelpText_observacao)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.EditSolicitacaoHistoricoLabel_fase}" for="fase" />
                        <h:panelGroup>
                            <p:selectOneMenu id="fase" value="#{solicitacaoHistoricoController.selected.fase}" required="true" requiredMessage="#{bundle.EditSolicitacaoHistoricoRequiredMessage_fase}" converter="solicitacaoFaseConverter">
                                <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                                <f:selectItems value="#{solicitacaoFaseController.items}"
                                               var="faseItem"
                                               itemValue="#{faseItem}"
                                               itemLabel="#{faseItem.id.toString()}"
                                               />

                            </p:selectOneMenu>
                            <p:tooltip for="fase" value="#{solicitacaoHistoricoController.getComponentMessages('fase', bundle.EditSolicitacaoHistoricoHelpText_fase)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.EditSolicitacaoHistoricoLabel_solicitacao}" for="solicitacao" />
                        <h:panelGroup>
                            <p:selectOneMenu id="solicitacao" value="#{solicitacaoHistoricoController.selected.solicitacao}" required="true" requiredMessage="#{bundle.EditSolicitacaoHistoricoRequiredMessage_solicitacao}" converter="solicitacaoConverter">
                                <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                                <f:selectItems value="#{solicitacaoController.items}"
                                               var="solicitacaoItem"
                                               itemValue="#{solicitacaoItem}"
                                               itemLabel="#{solicitacaoItem.descricao.toString()}"
                                               />

                            </p:selectOneMenu>
                            <p:tooltip for="solicitacao" value="#{solicitacaoHistoricoController.getComponentMessages('solicitacao', bundle.EditSolicitacaoHistoricoHelpText_solicitacao)}"/>
                        </h:panelGroup>


                        <p:outputLabel value="#{bundle.EditSolicitacaoHistoricoLabel_responsavel}" for="responsavel" />
                        <h:panelGroup>
                            <p:selectOneMenu id="responsavel" value="#{solicitacaoHistoricoController.selected.responsavel}"  converter="colaboradorConverter">
                                <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                                <f:selectItems value="#{colaboradorController.items}"
                                               var="responsavelItem"
                                               itemValue="#{responsavelItem}"
                                               itemLabel="#{responsavelItem.id.toString()}"
                                               />

                            </p:selectOneMenu>
                            <p:tooltip for="responsavel" value="#{solicitacaoHistoricoController.getComponentMessages('responsavel', bundle.EditSolicitacaoHistoricoHelpText_responsavel)}"/>
                        </h:panelGroup>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{solicitacaoHistoricoController.save}" value="#{bundle.Save}" update="display,:SolicitacaoHistoricoListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,SolicitacaoHistoricoEditDialog);">
                        <p:confirm header="#{bundle.ConfirmationHeader}" message="#{bundle.ConfirmEditMessage}" icon="ui-icon-alert"/>
                    </p:commandButton>
                    <p:commandButton value="#{bundle.Cancel}" onclick="SolicitacaoHistoricoEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
